package com.example.demo528.service;

import com.example.demo528.domain.Ebook;
import com.example.demo528.domain.EbookExample;
import com.example.demo528.domain.Pet;
import com.example.demo528.domain.PetExample;
import com.example.demo528.mapper.PetMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PetService {
    @Resource
    private PetMapper petMapper;

    public List<Pet> list(String name){
        PetExample petExample = new PetExample();
        PetExample.Criteria criteria = petExample.createCriteria();
        criteria.andNameLike("%"+name+"%");
        return petMapper.selectByExample(petExample);
    }
}
